import http from "@/utils/request";

export const getSupplier = (params) => {
  //返回供应商列表
  return http.get("/supplier/page", {
    params: {
      curPage: params.curPage,
      limit: params.limit,
      sname: params.sname,
    },
  });
};
export const addSupplier = (data) => {
  //增加供应商信息
  return http.post("/supplier/addSupplier", data);
};
export const editSupplier = (data) => {
  //更新供应商信息
  return http.post("/supplier/editSupplier", data);
};
export const delSupplier = (param) => {
  //删除供应商信息
  const myparams = new URLSearchParams();
  myparams.append("sid", param);
  return http.post("/supplier/delSupplier/", myparams);
};
